#!/bin/bash

#
# 依赖安装脚本
# 使用:
#   ./scripts/ci
#

NPM_REGISTRY="https://mirrors.tencent.com/npm/"

## 获取所有参数
echo "运行命令: export COREPACK_NPM_REGISTRY=$NPM_REGISTRY && corepack enable pnpm && pnpm i --registry $NPM_REGISTRY --frozen-lockfile $*"

# 导出corepack环境变量，安装pnpm版本
export COREPACK_NPM_REGISTRY=$NPM_REGISTRY COREPACK_INTEGRITY_KEYS=0 && corepack enable pnpm

# 安装项目依赖
pnpm i  --registry $NPM_REGISTRY --frozen-lockfile "$@"
